// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** 此处后端没有提供注释 POST /sysUser/addUserToRole */
export async function addUserToRole(
  body: UserService.UserAssignRoleVO,
  options?: { [key: string]: any }
) {
  return request<UserService.ResultString>(`/user/sysUser/addUserToRole`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 DELETE /sysUser/deleteUser/${param0} */
export async function deleteUser(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: UserService.deleteUserParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<UserService.ResultString>(`/user/sysUser/deleteUser/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /sysUser/findAllUsers */
export async function findAllUsers(options?: { [key: string]: any }) {
  return request<UserService.ResultListSysUser>(`/user/sysUser/findAllUsers`, {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /sysUser/getAllUserRoles */
export async function getAllUserRoles(options?: { [key: string]: any }) {
  return request<UserService.ResultMapLongListLong>(`/user/sysUser/getAllUserRoles`, {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /sysUser/getRoleIds */
export async function getRoles(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: UserService.getRolesParams,
  options?: { [key: string]: any }
) {
  return request<UserService.ResultListLong>(`/user/sysUser/getRoleIds`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /sysUser/getUser */
export async function getUser(options?: { [key: string]: any }) {
  return request<UserService.ResultSysUser>(`/user/sysUser/getUser`, {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /sysUser/getUserById/${param0} */
export async function getUserById(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: UserService.getUserByIdParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<UserService.ResultSysUser>(`/user/sysUser/getUserById/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 PUT /sysUser/resetPassword/${param0} */
export async function resetPassword(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: UserService.resetPasswordParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<UserService.ResultString>(`/user/sysUser/resetPassword/${param0}`, {
    method: 'PUT',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 PUT /sysUser/updatePassword */
export async function updatePassword(
  body: UserService.UpdatePasswordVO,
  options?: { [key: string]: any }
) {
  return request<UserService.ResultString>(`/user/sysUser/updatePassword`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 PUT /sysUser/updateUser */
export async function updateUser(body: UserService.SysUser, options?: { [key: string]: any }) {
  return request<UserService.ResultString>(`/user/sysUser/updateUser`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
